package com.jt.assistant.adapter

import android.annotation.SuppressLint
import android.view.View
import android.widget.TextView
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.jt.assistant.R
import com.jt.assistant.bean.Waybills

class DocumentAdapter(mData: MutableList<Waybills>) :
    BaseQuickAdapter<Waybills, BaseViewHolder>(
        R.layout.item_document_list, mData
    ) {


    @SuppressLint("SetTextI18n")
    override fun convert(holder: BaseViewHolder, item: Waybills) {
        val tvCode = holder.getView<View>(R.id.tv_code) as TextView
        val tvDetail = holder.getView<View>(R.id.tv_detail) as TextView
        tvCode.text = item.channelOrderNo
        tvDetail.text = "体积: ${item.volume}m³    " + "重量: ${item.weight}Kg"
    }
}